home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / CPlusPlus / SUCursor.xh < prev    next >
Encoding:
Text File  |  1997-02-13  |  5.7 KB  |  236 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: SUCursor.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODStorageUnitCursor_xh
  18. #define SOM_ODStorageUnitCursor_xh
  19.  
  20. class ODStorageUnitCursor;
  21.  
  22. #define ODStorageUnitCursor_MajorVersion 1
  23. #define ODStorageUnitCursor_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_ODObject_xh
  31. #include <ODObject.xh>
  32. #endif
  33.  
  34. #ifndef ODStorageUnitCursor_API
  35. #define ODStorageUnitCursor_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of user-defined types:
  42.  */
  43. class SOMClass;
  44. class SOMObject;
  45. class ODFrame;
  46. class ODFacet;
  47. class ODObject;
  48. class ODExtension;
  49. class ODStorageUnitCursor;
  50. class ODStorageUnit;
  51.  
  52. /*
  53.  * End of user-defined types.
  54.  */
  55.  
  56. #ifdef OLDIBMSOMAPISUPPORT
  57. #define ODStorageUnitCursorCClassData ODStorageUnitCursorClassData
  58. #define ODStorageUnitCursorNewClass(major,minor) somNewVersionedClassReference(ODStorageUnitCursor,major,minor)
  59. #endif
  60.  
  61. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  62. #define ODStorageUnitCursorMetaClass SOMClass
  63.  
  64. #if PRAGMA_ALIGN_SUPPORTED
  65. #  pragma options align=power
  66. #endif
  67.  
  68. /* The API to the ODStorageUnitCursor class object, and the methods it introduces. */
  69. SOMEXTERN struct ODStorageUnitCursorClassDataStructure {
  70. #ifdef OLDIBMSOMAPISUPPORT
  71.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  72. #else
  73.     long zero;
  74. #endif
  75.     somStaticClassInfo *sci;
  76.     somDToken        instanceDataToken;
  77.     long reserved [3];
  78.     somMToken reserved1;
  79.     somMToken GetProperty;
  80.     somMToken GetValueType;
  81.     somMToken GetValueIndex;
  82.     somMToken SetProperty;
  83.     somMToken SetValueType;
  84.     somMToken SetValueIndex;
  85. } SOMDLINK ODStorageUnitCursorClassData;
  86.  
  87. #if PRAGMA_ALIGN_SUPPORTED
  88. #  pragma options align=reset
  89. #endif
  90.  
  91. #if !defined(ODStorageUnitCursor_Class_Source) && !defined(SOM_Module_sucursor_Source)
  92. #if PRAGMA_IMPORT_SUPPORTED
  93. #pragma import list ODStorageUnitCursorClassData
  94. #endif
  95. #endif
  96.  
  97.  
  98. /*
  99.  * -- Typedefs and inline method declarations for left path inherited methods
  100.  * -- are omitted because this compilation had -museinheritedmethods in effect
  101.  */
  102.  
  103.  
  104. /*
  105.  * -- Typedefs for ODStorageUnitCursor Method Procedures
  106.  */
  107. SOMEXTERN {
  108. typedef void   (* SOMLINK somTD_ODStorageUnitCursor_GetProperty)(ODStorageUnitCursor *somSelf, Environment *ev,
  109.         ODPropertyName* propertyName);
  110. typedef void   (* SOMLINK somTD_ODStorageUnitCursor_GetValueType)(ODStorageUnitCursor *somSelf, Environment *ev,
  111.         ODValueType* valueType);
  112. typedef void   (* SOMLINK somTD_ODStorageUnitCursor_GetValueIndex)(ODStorageUnitCursor *somSelf, Environment *ev,
  113.         ODValueIndex* valueIndex);
  114. typedef void   (* SOMLINK somTD_ODStorageUnitCursor_SetProperty)(ODStorageUnitCursor *somSelf, Environment *ev,
  115.         ODPropertyName propertyName);
  116. typedef void   (* SOMLINK somTD_ODStorageUnitCursor_SetValueType)(ODStorageUnitCursor *somSelf, Environment *ev,
  117.         ODValueType valueType);
  118. typedef void   (* SOMLINK somTD_ODStorageUnitCursor_SetValueIndex)(ODStorageUnitCursor *somSelf, Environment *ev,
  119.         ODValueIndex valueIndex);
  120. }
  121.  
  122. #endif /* ODStorageUnitCursor_API */
  123.  
  124.  
  125. /*
  126.  * -- This emitter treats Method Tokens as Thunks by default.
  127.  * -- Use the sc modifier "nothunks" to change this default
  128.  */
  129. #undef somresolve_
  130. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  131.  
  132. /*
  133.  * -- The C++ Wrapper Class for ODStorageUnitCursor
  134.  */
  135. class ODStorageUnitCursor : public ODObject
  136. {
  137. public:
  138.  
  139. // ODStorageUnitCursor::new registers use of the class object, and then uses somNew
  140. // to allocate memory and load the object method table pointer. 
  141. void *operator new(size_t size)
  142. {
  143.     SOM_IgnoreWarning(size);
  144.     // Allocate memory using the default allocator for ODStorageUnitCursor, and
  145.     // clear mem & set method table pointer, call basic initialization
  146. #ifdef SOMCHKNULL
  147.     void * __somResult = (void *)
  148.       somNewObject(ODStorageUnitCursor);
  149.     SOMCHKNULL(__somResult);
  150.     return __somResult;
  151. #else
  152.     return (void*) somNewObject(ODStorageUnitCursor);
  153. #endif
  154. }
  155.  
  156. // ODStorageUnitCursor::delete uses the default deallocator for the object's class.
  157. void operator delete(void * obj)
  158. {
  159.     if (obj) {
  160.         SOM_Resolve(obj,SOMObject,somFree)
  161.            ( (SOMObject*) obj );
  162.     }
  163. }
  164.  
  165. /* method: GetProperty */
  166. void   GetProperty(Environment *ev,
  167.         ODPropertyName* propertyName)
  168. {
  169.    SOM_ResolveD(this,ODStorageUnitCursor,ODStorageUnitCursor,GetProperty)
  170.     (this,ev,propertyName);
  171. #ifdef SOMCHKEXCEPT
  172.       SOMCHKEXCEPT;
  173. #endif
  174. }
  175.  
  176. /* method: GetValueType */
  177. void   GetValueType(Environment *ev,
  178.         ODValueType* valueType)
  179. {
  180.    SOM_ResolveD(this,ODStorageUnitCursor,ODStorageUnitCursor,GetValueType)
  181.     (this,ev,valueType);
  182. #ifdef SOMCHKEXCEPT
  183.       SOMCHKEXCEPT;
  184. #endif
  185. }
  186.  
  187. /* method: GetValueIndex */
  188. void   GetValueIndex(Environment *ev,
  189.         ODValueIndex* valueIndex)
  190. {
  191.    SOM_ResolveD(this,ODStorageUnitCursor,ODStorageUnitCursor,GetValueIndex)
  192.     (this,ev,valueIndex);
  193. #ifdef SOMCHKEXCEPT
  194.       SOMCHKEXCEPT;
  195. #endif
  196. }
  197.  
  198. /* method: SetProperty */
  199. void   SetProperty(Environment *ev,
  200.         ODPropertyName propertyName)
  201. {
  202.    SOM_ResolveD(this,ODStorageUnitCursor,ODStorageUnitCursor,SetProperty)
  203.     (this,ev,propertyName);
  204. #ifdef SOMCHKEXCEPT
  205.       SOMCHKEXCEPT;
  206. #endif
  207. }
  208.  
  209. /* method: SetValueType */
  210. void   SetValueType(Environment *ev,
  211.         ODValueType valueType)
  212. {
  213.    SOM_ResolveD(this,ODStorageUnitCursor,ODStorageUnitCursor,SetValueType)
  214.     (this,ev,valueType);
  215. #ifdef SOMCHKEXCEPT
  216.       SOMCHKEXCEPT;
  217. #endif
  218. }
  219.  
  220. /* method: SetValueIndex */
  221. void   SetValueIndex(Environment *ev,
  222.         ODValueIndex valueIndex)
  223. {
  224.    SOM_ResolveD(this,ODStorageUnitCursor,ODStorageUnitCursor,SetValueIndex)
  225.     (this,ev,valueIndex);
  226. #ifdef SOMCHKEXCEPT
  227.       SOMCHKEXCEPT;
  228. #endif
  229. }
  230.  
  231. };   /* ODStorageUnitCursor */
  232.  
  233.  
  234.  
  235. #endif       /* SOM_ODStorageUnitCursor_xh */
  236.